<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
        <script src="./lib/vue.js"></script>
    </head>
    <body>
        <div id="app">
            <div v-bind:style="{border: borderStyle, width: widthStyle, height: heightStyle}"></div>
            <div v-bind:style="objStyle"></div>
            <button v-on:click="handle">按钮</button>
        </div>
        <script>
            var app = new Vue({
                el: '#app',
                data: {
                    borderStyle: '1px solid blue',
                    widthStyle: '100px',
                    heightStyle: '200px',
                    objStyle: {
                        border: '1px solid green',
                        width: '200px',
                        height: '100px'
                    },
                    overrideStyles: {
                        border: '5px solid orange',
                        backgroundColor: ''
                    }
                },
                methods: {
                    handle: function() {
                        this.heightStyle = '100px';
                        this.objStyle.width = '100px';
                    }
                }
            });
        </script>
    </body>
</html>
